package com.zzb.auth.controller;

import com.zzb.ucenter.mapper.XcCompanyMapper;
import com.zzb.ucenter.model.po.XcCompany;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author zzb
 * @Date 2024/7/10 12:40
 * @Version 1.0
 * @description
 */
@RestController
@RequestMapping("/company")
public class XcCompanyController {
    @Resource
    private XcCompanyMapper xcCompanyMapper;

    @GetMapping("/{id}")
    public String getCompanyNameById(@PathVariable Long id) {
        XcCompany xcCompany = xcCompanyMapper.selectById(id);
        return xcCompany.getName();
    }
}
